package com.lnn.springBase.common;

public enum ResultEnum {

    /**
     * return success result.
     */
    SUCCESS(200, "接口调用成功"),
    /**
     * return business common failed.
     */
    COMMON_FAILED(400, "接口调用失败"),

    NOT_FOUND(404, "接口不存在"),
    FORBIDDEN(403, "资源拒绝访问"),
    UNAUTHORIZED(401, "未认证（签名错误）"),

    INTERNAL_SERVER_ERROR(500, "服务器内部错误"),


    NULL_POINT(200002, "空指针异常"),
    VALIDATE_FAILED(200001, "参数错误");

    private Integer code;
    private String msg;

    ResultEnum(Integer code, String msg) {
        this.code = code;
        this.msg = msg;
    }

    public Integer getCode() {
        return code;
    }

    public String getMsg() {
        return msg;
    }
}
